home *** CD-ROM | disk | FTP | other *** search
/ The Ultimate Millenium Investment Guide / Hargreaves Lansdown - The Ultimate Millenium Investment Guide (IG).ISO / pc / Xtras / DirectMedia / DirectMedia Documentation.dxr / 00006_Field_Lingo Functions.txt < prev    next >
Text File  |  1998-04-14  |  4KB  |  71 lines

  1. Lingo Functions
  2.  
  3. DirectMedia Xtra┬« provides several functions that can be called from Lingo to control the playback of your Media files. 
  4.  
  5.  
  6. Cast Member Functions
  7.  
  8. isDirectShowInstalled (member x) -- returns 1 (TRUE) or 0 (FALSE). Can be used to determine if DirectShow (formerly ActiveMovie) is installed on the user's machine. You should use a valid DirectMedia Xtra┬« cast member index to access this function. 
  9. Example: isDirectShowInstalled(member 1)
  10.                if the result=0 then
  11.                     alert("Please install DShow")
  12.                else
  13.                     --nothing
  14.                end if
  15.  
  16. addcuepoint(member x, cuepointtime, cuepointname) -- this function can be used to create a new cue point from Lingo. Cue points are automatically sorted for you.
  17. Example: addcuepoint(member 2, 10500, "NewCue")
  18.  
  19. removecuepoint(member x, cuepointindex) -- this function can be used to remove a cue point. You should supply the index of the cue point to be removed.
  20. Example: removecuepoint(member 2, 1)
  21.  
  22.  
  23. Sprite Functions
  24.  
  25. videoplay (sprite x) -- used to start or resume playback of a Media file. Playback is usually started automatically when the sprite is loaded, unless the "Paused at Start" option is checked.
  26. Example: videoplay(sprite 1)
  27.  
  28. videopause (sprite x) -- used to pause playback of a Media file. 
  29. Example: videopause(sprite 1)
  30.  
  31. videoseek (sprite x, time) -- seeks the video to a different time in the Media file, and pause the video. Time should be expressed in milliseconds.
  32. Example: videoseek(sprite 1, 15000)
  33.  
  34. videoplaysegment(sprite x, starttime, endtime) -- plays a segment of the Media file. Please note that using this option actually limits access to the times of the stream that falls outside the playback segment boundaries. You should use another videoplaysegment() command to seek to a different time on the stream.
  35. Example: videoplaysegment(sprite 1, 10000,20000)
  36.                -- the following command pauses the video in time location 30000
  37.                videoplaysegment(sprite 1, 30000,30000)
  38.  
  39. isPastCuePoint(sprite x, cuepointindex) -- returns TRUE if the cue point indicated has already passed, FALSE otherwise.
  40. Example: isPastCuePoint(sprite 1,  2)
  41.               put the result
  42.              --- 1
  43.  
  44. setvolume (sprite x, volume) -- sets the volume of audio playback during the current sprite span. Valid volumes are in the range of -100 to 0 dB.
  45. Example: setvolume(sprite 1, 0)
  46.  
  47. getvolume (sprite x) -- returns the current volume of audio playback, in dB.
  48. Example:  put getvolume(sprite 1)
  49.                 -- -20
  50.  
  51. setbalance (sprite x, balance) -- sets the balance of audio playback during the current sprite span. Valid values are in the range of -100 to 100 dB.
  52. Example: setvolume(sprite 1, 0)
  53.  
  54. getbalance (sprite x) -- returns the current balance of audio playback, in dB.
  55. Example:  put getbalance(sprite 1)
  56.                 -- -100
  57.  
  58. setrate (sprite x, rate) -- sets the rate of playback during the current sprite span. Valid values are in the range of 0 to 200 %.
  59. Example: setrate(sprite 1, 80)
  60.  
  61. getrate (sprite x) -- returns the current playback rate, in %.
  62. Example:  put getrate(sprite 1)
  63.                 -- 100
  64.  
  65. setfulscreen (sprite x) -- this function will trigger the ActiveMovie/DirectShow full-screen video renderer. The DirectMedia Xtra sprite will be promoted to full-screen playback and a new video surface will be created. The full-screen renderer works independently from the authoring application, and it will be full-screen even if the stage in Director (or Presentation Window in Authorware) does not fill the whole monitor. Mouse event detection and keypresses are NOT passed to the authoring application, so you should use this function in conjunction with cuepoints to return control to the authoring application. Remember to call RemoveFullScreen() when you are done with playback.
  66. Example: setfullscreen(sprite 1)
  67.  
  68. removefulscreen (sprite x) -- this function will disable the ActiveMovie/DirectShow full-screen video renderer. The DirectMedia Xtra sprite will return to its original window on the stage in Director (or Presentation Window in Authorware). 
  69. Example: removefullscreen(sprite 1)
  70.  
  71.